package cn.iocoder.yudao.module.service.dal.mysql.stepform;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.service.dal.dataobject.stepform.StepFormDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.service.controller.admin.stepform.vo.*;

/**
 * 表单 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface StepFormMapper extends BaseMapperX<StepFormDO> {

    default PageResult<StepFormDO> selectPage(StepFormPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StepFormDO>()
                .eqIfPresent(StepFormDO::getStepId, reqVO.getStepId())
                .eqIfPresent(StepFormDO::getFormContent, reqVO.getFormContent())
                .betweenIfPresent(StepFormDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(StepFormDO::getId));
    }

}